class Weather {
  String cond; //天气
  String tmp;  //温度
  String hum;  //湿度

  Weather({this.cond, this.tmp, this.hum});

  factory Weather.fromJson(Map<String, dynamic> json) {
    return Weather(
      cond: json['data']['yesterday']['type'],
      tmp: json['data']['wendu']+"°",
      hum: "湿度  "+json['data']['shidu'],
    );
  }

  factory Weather.empty() {
    return Weather(
      cond: "多云",
      tmp: "18°",
      hum: "湿度  50%"
    );
  }
}